package semantic.analyzer;

import metamodel.PrimitiveTypeEnum;
import semantic.model.ExpressionNode;

public class IfExpressionAnalyzer {

	public static void check(ExpressionNode... nodes) throws Exception {
		for (ExpressionNode node : nodes) {
			if (node != null && !node.getType().equalsIgnoreCase(PrimitiveTypeEnum.BOOLEAN.name())) {
				throw new Exception("Era esperado tipo Boolean no 'if'!");
			}
		}
	}
	
}
